Skip to content

feat: add runtime admin, batch, diagnostics, and recording commands#416

Merged
thymikee merged 5 commits into
mainfrom
pr-415
Apr 16, 2026
Merged

feat: add runtime admin, batch, diagnostics, and recording commands#416
thymikee merged 5 commits into
mainfrom
pr-415

Conversation

@thymikee

@thymikee thymikee commented Apr 16, 2026

Copy link
Copy Markdown
Member

Summary

Moves phases 4/5/6 onto the runtime/router surface and trims back the unfinished phase 7 exposure:

  • keeps runtime admin.*, router batch, record, trace, and diagnostics.* public
  • removes router-level replay and test from the public runtime types and dispatch path, and marks them planned again in commandCatalog
  • replaces the separate implemented-command manifest with a single runtime dispatcher map and adds catalog alignment coverage
  • hardens diagnostics body redaction by recursively sanitizing parsed JSON payloads and extending fallback text redaction to common bearer-token/header patterns
  • updates runtime ownership and client API docs to describe diagnostics redaction as best-effort
  • fixes admin.install/admin.reinstall temp-input cleanup so uploaded-artifact materialization is released even when backend source resolution fails

Validation

  • pnpm format
  • pnpm typecheck
  • pnpm vitest run src/__tests__/runtime-admin-router.test.ts
  • pnpm vitest run src/__tests__/runtime-admin-router.test.ts src/__tests__/runtime-diagnostics-router.test.ts src/__tests__/runtime-public.test.ts
  • pnpm check:quick
  • STATE_DIR=$(mktemp -d); AGENT_DEVICE_STATE_DIR="$STATE_DIR" pnpm check:unit; STATUS=$?; rm -rf "$STATE_DIR"; exit $STATUS
  • pnpm build
  • STATE_DIR=$(mktemp -d); AGENT_DEVICE_STATE_DIR="$STATE_DIR" pnpm test:integration; STATUS=$?; rm -rf "$STATE_DIR"; exit $STATUS
  • AGENT_DEVICE_STATE_DIR=$(mktemp -d /tmp/agent-device-e2e-ios-XXXXXX) pnpm test:replay:ios (6 passed)
  • AGENT_DEVICE_STATE_DIR=$(mktemp -d /tmp/agent-device-e2e-ios-device-XXXXXX) pnpm test:replay:ios-device (1 passed)
  • AGENT_DEVICE_STATE_DIR=$(mktemp -d /tmp/agent-device-e2e-macos-rerun-XXXXXX) pnpm test:replay:macos (1 passed on rerun; first attempt hit transient _LSOpenURLsWithCompletionHandler ... error -600 launching System Settings)
  • AGENT_DEVICE_STATE_DIR=$(mktemp -d /tmp/agent-device-e2e-android-XXXXXX) pnpm test:replay:android failed because no Android devices were connected
  • AGENT_DEVICE_STATE_DIR=$(mktemp -d /tmp/agent-device-e2e-linux-XXXXXX) pnpm test:replay:linux failed because no Linux desktop target was available on this host
  • AGENT_DEVICE_STATE_DIR=$(mktemp -d /tmp/agent-device-recording-e2e-XXXXXX) AGENT_DEVICE_RECORDING_E2E=1 node --test test/integration/recording-overlay.test.ts exposed existing live failures: iOS tap passed, iOS scroll overlay saw 0 overlay pixels, iOS back-swipe reported iOS runner session restarted during recording, and Android recording cases failed because no Android device was available

@github-actions

github-actions Bot commented Apr 16, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstackincubator.github.io/agent-device/pr-preview/pr-416/

Built to branch gh-pages at 2026-04-16 15:04 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4f7e067cd5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/commands/admin.ts Outdated
Comment on lines +187 to +189
const backendResolved = runtime.backend.resolveInstallSource
? await runtime.backend.resolveInstallSource(context, localResolved.source)
: localResolved.source;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clean up resolved inputs when source resolution fails

If backend.resolveInstallSource throws, the temporary file/materialization created by resolveLocalInstallSource is leaked because cleanup is only returned on success and only executed later in runInstallCommand's finally. This is reproducible with source.kind === 'uploadedArtifact' when the backend rejects or times out during source resolution, and it can accumulate temp artifacts across failed installs. Wrap backend source resolution in a local try/finally (or catch + rethrow) so localResolved.cleanup runs on this error path too.

Useful? React with 👍 / 👎.

@thymikee thymikee changed the title feat: add runtime admin and orchestration commands feat: add runtime admin, diagnostics, and orchestration commands Apr 16, 2026
@thymikee thymikee changed the title feat: add runtime admin, diagnostics, and orchestration commands feat: add runtime admin, batch, diagnostics, and recording commands Apr 16, 2026
@thymikee thymikee merged commit f0eb8c6 into main Apr 16, 2026
14 of 15 checks passed
@thymikee thymikee deleted the pr-415 branch April 16, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant